package com.shenhaofeng.app.download;


/**
 * 下载监听器,监听下载改变
 * Created by Administrator on 2016/9/14.
 */
public interface DownloadListener {


    /**
     * 下载完成时将会被调用
     *
     * @param result 下载结果
     */
    void onDownloadFinish(DownloadResult result);


    void onDownloadStop(DownloadExecutor executor);

    /**
     * 下载被取消时将会被调用
     *
     * @param request
     */
    void onDownloadCancel(DownloadExecutor request);


    /**
     * 下载失败时将会被调用
     *
     * @param result
     */
    void onDownloadFailure(DownloadExecutor result,Throwable throwable);


    void onDownloadProgress(DownloadExecutor result,long maxCount,long count);

    /**
     * 在开始某个下载时将会被调用
     *
     * @param executor
     */
    void onDownloadStart(DownloadExecutor executor);


}
